// free tools for java
Package examples
T o o l s
-Assembler
--Package examples
--Script examples
--Jas API
--Scripting API
--Notes
  This section assumes that you have a working knowledge of bytecode and the java VM. The java VM specification is the best bet of information for this, and was last sighted here.

The assembler is now usable as a package, and I've walked through a few examples to show how the jas package can be used from java to generate bytecode.

  examples
 
Simple
The goal is to generate a class that simply gets initialized.
Loops
Generate bytecode with control transfers in it. This example generates a class that prints a string in a loop.
Mini expression compiler
A slightly more extensive example that uses the assembler to create a small runtime code generator to convert arithmetic expressions to bytecode and load it as a class.
 
T o o l s/Assembler

Package examples | Script examples | Jas API | Scripting API | Notes

http://www.sbktech.org/jas-java.html Revised: Thu Dec 19 08:51:14 1996
Copyright (C) 1996 KB Sriram.
Comments, bug reports: kbs@sbktech.org
Found something useful?